import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/login',
    method: 'post',
    data:{
      username:data.username,
      password:data.password,
      entNum:data.entNum
    }
  })
}

export function getInfo() {
  return request({
    url: '/user/info',
    method: 'get'
  })
}

export function logout(data) {
  return request({
    url: '/logout',
    method: 'post',
    data
  })
}

export function changePwd(data) {
  return request({
    url: '/user/password/modify',
    method: 'get',
    params: data
  })
}

export function getUserMenu() {
  return request({
    url: '/user/menus',
    method: 'get'
  })
}

export function getUserProduct() {
  return request({
    url: '/system/user/products',
    method: 'get'
  })
}
